'''
Author: sevenFunuction 1593215788@qq.com
Date: 2024-06-24 22:32:20
LastEditors: sevenFunuction 1593215788@qq.com
LastEditTime: 2024-06-24 22:51:52
FilePath: \python\alien_invasion\config\logger_config.py
Description: 日志输出配置文件
'''
import logging

def setup_logger():
    # 配置日志记录
    logging.basicConfig(
        level=logging.INFO,  # 设置日志级别
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',  # 设置日志格式
        handlers=[
            logging.FileHandler("alien_invasion.log"),  # 将日志写入文件
            logging.StreamHandler()  # 同时输出到控制台
        ]
    )
